import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import echarts from './views/charts/echarts.vue'
import Department from "./views/org/Department.vue";
import Employee from "./views/org/Employee.vue";
import Permission from "./views/auth/Permission.vue";
import Role from "./views/auth/Role.vue";
import Menu from "./views/auth/Menu.vue";
import NoPermission from "./views/NoPermission.vue";
import Shop from "./views/org/Shop.vue";
import ShopRegister from "./views/ShopRegister.vue";

let routes = [
    {
        path: '/',
        component: Home,
        name: 'Home',
        iconCls: 'el-icon-message',//图标样式class
        hidden: true,
        children: [
            { path: '/noPermission', component: NoPermission, name: '无权限',hidden: true },
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Home',
        iconCls: 'fa fa-bar-chart',
        leaf: true,
        children: [
            { path: '/index', component: echarts, name: '主页' }
        ]
    },
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/shopRegister',
        component: ShopRegister,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/employee', component: Employee, name: '员工管理' },
            { path: '/shop', component: Shop, name: '店铺管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '权限管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/permission', component: Permission, name: '权限管理' },
            { path: '/role', component: Role, name: '角色管理' },
            { path: '/menu', component: Menu, name: '菜单管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;